
<style type="text/css">
body,td {font-size:12px;line-height: 22px;}
input.button, input.btn {
    padding: 0.25em;
    width: auto;
    margin:0px auto;
}
.button {
    background: none repeat scroll 0 0 #DDDDDD;
    border-color: -moz-use-text-color #666666 #666666 -moz-use-text-color;
    border-style: none solid solid none;
    border-width: 0 1px 1px 0;
    height: 24px;
    margin-right: 5px;
    padding: 3px 6px;
}
</style>

<h1 align="center">订单信息</h1>
<table width="100%" cellpadding="1">
    <tr>
        <td width="8%">购货 人：</td>
        <td><?php echo (isset($user['first_name']) ? $user['first_name'] : null)  . '.' . (isset($user['last_name']) ? $user['last_name'] : null);?><!-- 购货人姓名 --></td>
        <td align="right">下单时间：</td><td><?php echo date('Y-m-d H:i:s', $order['start_time'])?><!-- 下订单时间 --></td>
        <td align="right">支付方式：</td><td><?php echo $order['payment_method_name']?><!-- 支付方式 --></td>
        <td align="right">订单编号：</td><td><?php echo $order['id']?><!-- 订单号 --></td>
    </tr>
    <tr>
        <td>付款时间：</td><td><?php echo date('Y-m-d H:i:s', $order['payment_time'])?><?php echo $order['payment_time']?></td><!-- 付款时间 -->
        <td align="right">发货时间：</td><td><?php echo date('Y-m-d H:i:s', $order['shipping_time'])?><!-- 发货时间 --></td>
        <td align="right">配送方式：</td><td><?php echo $order['shipping_method_name']?><!-- 配送方式 --></td>
        <td align="right">发货单号：</td><td><?php echo $order['shipping_no']?> <!-- 发货单号 --></td>
    </tr>
    <tr>
        <td>收货地址：</td>
        <td colspan="7">
        [<?php echo $order['delivery_country']?>]-[<?php echo $order['delivery_province']?>]-[<?php echo $order['delivery_city']?>]&nbsp;<?php echo $order['delivery_address']?><?php echo $order['delivery_address2']?><?php echo $order['delivery_address3']?>&nbsp;<!-- 收货人地址 -->
        收货人：<?php echo $order['delivery_first_name']  . '.' . $order['delivery_last_name']?>&nbsp;<!-- 收货人姓名 -->
        <!-- 邮政编码 -->
        电话：<?php echo $order['delivery_phone']?>&nbsp; <!-- 联系电话 -->
        手机：<?php echo $order['delivery_mobile']?><!-- 手机号码 -->
        </td>
    </tr>
</table>


<div class="order_th">身形数据</div>
<?php if(isset($order['measure_data']) && $order['measure_data'] ):?>
<div class="contentList division pad-10 ">
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="table_form"> 
	<tbody>
		<?php 
           	$data = unserialize($order['measure_data']);
           	$i=0;
           	foreach ($data as $key => $val){
           		if($i==0 || $i%5==0){
           			echo '<tr>';
           		}
           		echo '<th style="width:50px">'. $key.'</th><td>';
           		if(is_array($val)){
           			foreach ($val as $key2 => $val2){
           				if($key2=='type'){
           					echo $val2.'&nbsp;';
           				}else{
           					echo $val2.$key2.' ';
           				}
           			}
           		}else{
           			echo  $val;
           		}
           		echo  '</td>';
           		if(($i+1)%5==0){
           			echo '</tr>';
           		}
           		$i++;
           	}
           ?>
 </tbody>
</table>
</div>
<?php endif;?>

<?php 
if(isset($order['product']) && $order['product']):
	foreach ($order['product'] as $key => $product):
?>
<div class="order_th">属性&nbsp;&nbsp;<span>商品名：<?php echo $product['product_name'];?></span></div>
<table>
<?php if($product['attr']):
	$product_attr = explode(",",$product['attr']);
	foreach ($product_attr as $attr):
		$attr = explode(":",$attr);
?>
<tr>
	<td><?php echo $attr[0];?>：</td>
	<td><?php echo $attr[1];?></td>
	<td><?php $attr_value = AttributeModel::getAttriubteValueInfo($attr[2]); if($attr_value['attr_img']):?><img src="<?php echo $attr_value['attr_img'] ?>" /><?php endif;?></td>
</tr>
<?php 
	endforeach;
endif;?>
</table>
<?php 
	endforeach;
endif;
?>

<table width="100%" border="0">
            
    <tr>
        <td align="center">
        	<input type="button" class="button" onclick="javascript:window.print();" value="打印">
       </td>
    </tr>
    
</table>